linkbutton: Only set widget cursor once
authorTimm Bäder <mail@baedert.org>
Fri, 19 Jan 2018 12:21:41 +0000 (13:21 +0100)
committerTimm Bäder <mail@baedert.org>
Fri, 19 Jan 2018 12:21:41 +0000 (13:21 +0100)
gtk/gtklinkbutton.c

index 1426a36c5e9e0f88bb5089f1d54dc4b57fff5f69..e2c16627b5222ed391eb3145f6a0255d7b15dfe4 100644 (file)
@@ -124,9 +124,6 @@ static void gtk_link_button_pressed_cb (GtkGestureMultiPress *gesture,
 
 static gboolean gtk_link_button_activate_link (GtkLinkButton *link_button);
 
-static void     set_hand_cursor (GtkWidget *widget,
-                                gboolean   show_hand);
-
 static const char *link_drop_types[] = {
   "text/uri-list",
   "_NETSCAPE_URL"
@@ -249,7 +246,7 @@ gtk_link_button_init (GtkLinkButton *link_button)
   context = gtk_widget_get_style_context (GTK_WIDGET (link_button));
   gtk_style_context_add_class (context, "link");
 
-  set_hand_cursor (GTK_WIDGET (link_button), TRUE);
+  gtk_widget_set_cursor_from_name (GTK_WIDGET (link_button), "pointer");
 }
 
 static void
@@ -307,16 +304,6 @@ gtk_link_button_set_property (GObject      *object,
     }
 }
 
-static void
-set_hand_cursor (GtkWidget *widget,
-                gboolean   show_hand)
-{
-  if (show_hand)
-    gtk_widget_set_cursor_from_name (widget, "pointer");
-  else
-    gtk_widget_set_cursor (widget, NULL);
-}
-
 static void
 popup_menu_detach (GtkWidget *attach_widget,
                   GtkMenu   *menu)